import 'package:df/utils/logger_utils.dart';
import 'package:flutter/material.dart';

class MyNavObserver extends NavigatorObserver {

  @override
  void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) =>
      LogUtils.v('didPush: ${route.toString()}, previousRoute= ${previousRoute?.toString()}');

  @override
  void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) =>
      LogUtils.v('didPop: ${route.toString()}, previousRoute= ${previousRoute?.toString()}');

  @override
  void didRemove(Route<dynamic> route, Route<dynamic>? previousRoute) =>
      LogUtils.v('didRemove: ${route.toString()}, previousRoute= ${previousRoute?.toString()}');

  @override
  void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) =>
      LogUtils.v('didReplace: new= ${newRoute?.toString()}, old= ${oldRoute?.toString()}');

  @override
  void didStartUserGesture(Route<dynamic> route, Route<dynamic>? previousRoute,) =>
      LogUtils.v('didStartUserGesture: ${route.toString()}, previousRoute= ${previousRoute?.toString()}');

  @override
  void didStopUserGesture() => LogUtils.v('didStopUserGesture');

}